package com.pp.ent.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.pp.ent.Cherry;
import com.pp.ent.base.log.MLog;

/**
 * Author:dengqu
 * Date:2016/7/27
 */
public class BaseFragment extends Fragment {
    private final static String TAG="BaseFragment";
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        MLog.debug(TAG,"onCreate");
        Cherry.injectObject(this);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return Cherry.injectFragment(this,inflater,container,savedInstanceState);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Cherry.remove(this);
    }
}
